﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed

#pragma once

#include "IPolygon.h"
 
namespace gcmp
{
    /// \brief 二维多边形布尔运算结果中的边的追溯数据
    ///
    class PolygonBoolResultIndexMap
    {
    public:
        PolygonBoolResultIndexMap(int sourcePolygonIndex, int sourceLoopIndex, int sourceCoedgeIndex) : 
            m_SourcePolygonIndex(sourcePolygonIndex), m_SourceLoopIndex(sourceLoopIndex), m_SourceCoedgeIndex(sourceCoedgeIndex) {}

        PolygonBoolResultIndexMap() : m_SourcePolygonIndex(-1), m_SourceLoopIndex(-1), m_SourceCoedgeIndex(-1) {}
        ~PolygonBoolResultIndexMap() {}

        /// \brief 获取来源多边形号
        /// 
        /// \return 来源多边形号
        int GetSourcePolygonIndex() const { return m_SourcePolygonIndex; }

        /// \brief 获取来源环号
        /// 
        /// \return 来源环号
        int GetSourceLoopIndex() const { return m_SourceLoopIndex; }

        /// \brief 获取来源边号
        /// 
        /// \return 来源边号
        int GetSourceCoedgeIndex() const { return m_SourceCoedgeIndex; }

    private:
        /// 来源的多边形号
        int m_SourcePolygonIndex;
        /// 来源的环号
        int m_SourceLoopIndex;
        /// 来源的边号
        int m_SourceCoedgeIndex;
    };

}